#!/bin/bash

DESTINATIONS=(
  root@8.212.10.178 
  root@8.212.15.60
  root@8.212.40.101
  root@8.212.41.23
  root@8.212.40.13
  root@8.212.41.65
  root@8.212.40.226
)

DESTINATION_DIR="/var/www/html/stall-server"

SOURCE_DIR="dist"

for DESTINATION in ${DESTINATIONS[*]}
do
  echo "--- START DEPLOY $DESTINATION ---"
  ssh $DESTINATION "cd $DESTINATION_DIR && git pull origin main"
  echo "--- END DEPLOY $DESTINATION ---"
done
echo 'DONE'
